<?php

/**
 * This is the model class for table "kreditpelunasanpegadiansingaparna".
 *
 * The followings are the available columns in table 'kreditpelunasanpegadiansingaparna':
 * @property integer $kpps_id
 * @property integer $kpps_bulan
 * @property integer $kpps_kreditbrgjaminan
 * @property integer $kpps_kredituangpinjmn
 * @property integer $kpps_pelunasanbrgjaminan
 * @property integer $kpps_pelunasanuangpinjmn
 * @property integer $kpps_tahun
 */
class Kreditpelunasanpegadiansingaparna extends CActiveRecord
{
	/**
	 * Returns the static model of the specified AR class.
	 * @return Kreditpelunasanpegadiansingaparna the static model class
	 */
	public static function model($className=__CLASS__)
	{
		return parent::model($className);
	}

	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'kreditpelunasanpegadiansingaparna';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('kpps_bulan, kpps_kreditbrgjaminan, kpps_kredituangpinjmn, kpps_pelunasanbrgjaminan, kpps_pelunasanuangpinjmn, kpps_tahun', 'numerical', 'integerOnly'=>true),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('kpps_id, kpps_bulan, kpps_kreditbrgjaminan, kpps_kredituangpinjmn, kpps_pelunasanbrgjaminan, kpps_pelunasanuangpinjmn, kpps_tahun', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'kpps_id' => 'Kpps',
			'kpps_bulan' => 'Kpps Bulan',
			'kpps_kreditbrgjaminan' => 'Kpps Kreditbrgjaminan',
			'kpps_kredituangpinjmn' => 'Kpps Kredituangpinjmn',
			'kpps_pelunasanbrgjaminan' => 'Kpps Pelunasanbrgjaminan',
			'kpps_pelunasanuangpinjmn' => 'Kpps Pelunasanuangpinjmn',
			'kpps_tahun' => 'Kpps Tahun',
		);
	}

	/**
	 * Retrieves a list of models based on the current search/filter conditions.
	 * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
	 */
	public function search()
	{
		// Warning: Please modify the following code to remove attributes that
		// should not be searched.

		$criteria=new CDbCriteria;

		$criteria->compare('kpps_id',$this->kpps_id);
		$criteria->compare('kpps_bulan',$this->kpps_bulan);
		$criteria->compare('kpps_kreditbrgjaminan',$this->kpps_kreditbrgjaminan);
		$criteria->compare('kpps_kredituangpinjmn',$this->kpps_kredituangpinjmn);
		$criteria->compare('kpps_pelunasanbrgjaminan',$this->kpps_pelunasanbrgjaminan);
		$criteria->compare('kpps_pelunasanuangpinjmn',$this->kpps_pelunasanuangpinjmn);
		$criteria->compare('kpps_tahun',$this->kpps_tahun);

		return new CActiveDataProvider($this, array(
			'criteria'=>$criteria,
		));
	}
}